package cn.kgc.springboot.mpx.controller;

import cn.kgc.springboot.mpx.entity.Dept;
import cn.kgc.springboot.mpx.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 课工场
 * @date 2024/11/30
 * @description
 */
@RestController
@RequestMapping("dept")
public class DeptController {

    @Autowired
    private DeptService deptService;


    @GetMapping("list")
    public List<Dept> deptList(){
        return deptService.list();
    }




}
